package net.sunofbeaches.dao;

import net.sunofbeaches.pojo.Images;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface ImagesDao  extends JpaRepository<Images, String>, JpaSpecificationExecutor<Images> {
    @Modifying
    @Query(nativeQuery = true,value = "UPDATE `tb_images` SET `state` = '0' WHERE `id` = ?;")
    int deleteImagesByUpdateState(String imageId);
}
